package com.sr.security;


import com.sr.enums.ResponseCode;
import org.springframework.security.core.AuthenticationException;

/**
 * @author xiaochi
 * @date 2022/5/2 17:22
 * @desc SecurityException
 */
public class SecurityException extends AuthenticationException {

    private static final long serialVersionUID = -4862492727410808917L;

    private ResponseCode responseCode;

    public SecurityException(String message) {
        super(message);
    }

    public SecurityException(ResponseCode responseCode){
        super(responseCode.getMessage());
        this.responseCode = responseCode;
    }
}
